var ConnectionManager = function() {
	// this.url = 'http://teamrepublic.hubweb.net/kkmTest/2011/json_recevie.php';
	//this.requestUrl = "http://192.168.0.81:8080/dcd/request.do";   // 개발
	this.requestUrl = "http://110.45.186.84:8080/dcd/request.do";  // 운영
	// this.requestUrl = "http://www.golfinsns.com/request.do";
};
 
ConnectionManager.prototype = {
	constructor : ConnectionManager,
	requestGet : function(json, onSuccess, onFail) {
		$.ajax({
			url : this.requestUrl, //데이터를 요청할 페이지
			type : 'GET',
			dataType : "jsonp",
			jsonp : "msp300",
			timeout : 10000,
			data : {
				"method" : "json",				
				"req" : json
			},
			error : onFail
			// success : onSuccess
		}).done(onSuccess);
	}
	, requestGetDev : function(json, onSuccess, onFail) {
		var devUrl = "http://192.168.0.81:8080/dcd/request.do";
		$.ajax({
			url : devUrl, //데이터를 요청할 페이지
			type : 'GET',
			dataType : "jsonp",
			jsonp : "msp300",
			timeout : 10000,
			data : {
				"method" : "json",				
				"req" : json
			},
			error : onFail
			// success : onSuccess
		}).done(onSuccess);
	}
};

/*
//"userid": "golfin3",
{
  "msp": {
    "header": {
      "client": "",
      "device": {
        "model": "PC",
        "ip": "192.168.0.1"
      }
    },
    "params": {
      "pub": {
        "sid": "BB001",
        "servicename": "",
        "listcount": ,
        "currpageno": 
      },
      "parameter": [
        {
          "@name": "search",
          "$": ""
        },
        {
          "@name": "title",
          "$": ""
        },
        {
          "@name": "content",
          "$": ""
        },
        {
          "@name": "reg_nickname",
          "$": ""
        }
      ]
    }
  }
}*/


